import request from '../utils/axios'

// 新增博客
export const createBlog = (data) => {
  return request.post("/blogs/create", data);
};

// 修改博客
export const updateBlog = (data) => {
  return request.put("/blogs/update", data);
};

// 删除博客
export const deleteBlogById = (id) => {
  return request.delete(`/blogs/delete/${id}`);
};

// 获取博客列表
export const fetchBlogList = () => {
  return request.get("/blogs/getList"); // 可根据需要加分页参数
};
